home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
USGS: Oil & Gas Fields of Asia Pacific
/
USGS Maps Showing Geology, Oil & Gas Fields of Asia Pacific.iso
/
pc
/
ASPAC
/
VIEWS03
/
SCRIPTS
/
ZMINBUT.AVE
< prev
next >
Wrap
Text File
|
1999-03-10
|
3KB
|
102 lines
' zminbut.ave
' Douglas Steinshouer 11/28/1998
' GeoLukas for USGS
' World Energy Program
' Modifies the ViewZoomIn button
' to label geologic age on the fly
region3 = av.GetProject
theView = av.GetActiveDoc
' Filters out Legend
leg = region3.FindDoc("Geologic Legend")
if (theView = leg) then
region3.SetModified(true)
theView.GetDisplay.ZoomIn(125)
else
av.ShowMsg("Labeling geologic age ...")
av.ShowStopButton
av.SetStatus(0)
region3.SetModified(true)
theView.GetDisplay.ZoomIn(125)
' Defines the theme and clears labels
theTheme = theView.GetThemes.Get(5)
theTheme.SetActive(true)
theTheme.GetGraphics.SelectLabels
theTheme.GetGraphics.Invalidate
theView.GetGraphics.ClearSelected
' Determines the scale of zoomed view
size = theView.GetDisplay.ReturnVisExtent
tall = size.GetHeight
long = size.GetWidth
' Filters scale and draws labels
if ((tall < 889000) AND (long < 1227670)) then
agelabel = Labeler.Make(size)
agelabel.SetFeatureWeight(#LABEL_WEIGHT_NO)
agelabel.SetLabelWeight(#LABEL_WEIGHT_LOW)
agesymbol = TextSymbol.Make
agesymbol.SetFont(Font.Make("Univers","Medium"))
if ((tall < 44450) AND (long < 61383)) then
agesymbol.SetSize(15)
elseif ((tall < 88900) AND (long < 122767)) then
agesymbol.SetSize(12)
elseif ((tall < 222250) AND (long < 306917)) then
agesymbol.SetSize(11)
elseif ((tall < 444500) AND (long < 613835)) then
agesymbol.SetSize(10)
elseif ((tall < 666751) AND (long < 920752)) then
agesymbol.SetSize(9)
else
agesymbol.SetSize(8)
end
theTheme.SetLabelTextSym(agesymbol)
agelabel.Load(theTheme)
theView.GetAutoLabels(agelabel,true)
else
theTheme.GetGraphics.SelectLabels
theTheme.GetGraphics.Invalidate
theView.GetGraphics.ClearSelected
end
t2 = theView.GetThemes.Get(0)
t2.SetActive(true)
t2.GetGraphics.SelectLabels
t2.GetGraphics.Invalidate
theView.GetGraphics.ClearSelected
citylabel = Labeler.Make(size)
citylabel.SetFeatureWeight(#LABEL_WEIGHT_NO)
citylabel.SetLabelWeight(#LABEL_WEIGHT_HIGH)
citysymbol = TextSymbol.Make
citysymbol.SetFont(Font.Make("Univers","Italic"))
citysymbol.SetSize(10)
t2.SetLabelTextSym(citysymbol)
citylabel.Load(t2)
theView.GetAutoLabels(citylabel,true)
ts = theView.GetThemes
for each t in ts
t.SetActive(false)
end
av.SetStatus(100)
av.ClearMsg
end